package org.spbsu.apco.common.monitoring.event;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * User: Anton Ovchinnikov
 * Date: 1/7/13
 * Time: 6:34 PM
 */

@XmlRootElement(namespace = "Event")
@XmlAccessorType(XmlAccessType.FIELD)
public class TaskEvent extends BaseEvent {
    public static final String INVALID_TASK_ID = "-1";

    @Override
    public String toString() {
        return "TaskEvent{" +
                "eventId='" + eventId + '\'' +
                ", originatorId='" + originatorId + '\'' +
                ", taskId='" + taskId + '\'' +
                ", taskStartTime=" + taskStartTime +
                ", taskDuration=" + taskDuration +
                '}';
    }

    public static TaskEvent getDummyTaskEvent() {
        final TaskEvent taskEvent = new TaskEvent();
        taskEvent.setTaskDuration(-1);
        taskEvent.setTaskStartTime(-1);
        return taskEvent;
    }

}
